home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / EXT / K-O / MemInit203.cpt / MemINIT 2.0.3 Folder / MemINIT 2.0.3.rsrc / TEXT_256.txt < prev    next >
Text File  |  1992-02-13  |  9KB  |  55 lines

  1. Compatibility:
  2.    MemINIT requires at least System 5.0 and a Macintosh 512KE.  Under systems before 6.0.5, you will have to restart for any changes in the control panel to take effect.  The bar graph works well in all color modes, including 32-bit and 16-bit, although it writes directly to the screen and so may not work on accelerated or otherwise strange video cards.  The pie graph will disappear when most screensavers save the screen, and the bar graph will be disabled properly by AfterDark version 2.0u and later.
  3.  
  4. The Function of MemINIT:
  5.    MemINIT is a utility that displays the amount of memory that your Macintosh is using, and how much is free.  It either puts a 1-pixel high bar at the top of the menu bar, replaces the apple symbol with a pie graph, or both.  In both of these displays, the black (or darker colored) section is the amount of memory used, and the white (or lighter colored) section is the amout free.  Note that this is only the amount of memory used and free for the current application - it doesn‚Äôt include any memory used by the system, and if you are running MultiFinder or System 7, it only displays the amount of memory used and free for the frontmost program.  This means that MemINIT can NOT be used to judge how much memory is free to launch more programs.  It is useful to judge if the current program should get more or less memory under MultiFinder.  To change the amount of memory that a program gets, in the Finder select the program and get info on it.  Then enter a new value for the application memory size.
  6.  
  7. How to configure MemINIT:
  8.    MemINIT is both a startup document, meaning it loads itself into memory when your computer starts up, and a control panel document, which means that you can configure it through the control panel (or by just double-clicking on it in System 7).  Note that you must put in in your System Folder or Control Panels folder and reboot for it to take effect.
  9.    To configure MemINIT, click it‚Äôs name in the control panel, or in System 7 double click it‚Äôs icon.  Here are the controls and what they do:
  10.    ‚Ä¢ Help - brings up this help text.  But you obviously knew that‚Ķ
  11.    ‚Ä¢ Show Startup Icon - If this box is checked, then the MemINIT icon will appear at the bottom of the screen when it loads into memory during startup.  If there is an error during startup, the MemINIT icon with an X through it will appear, regardless of the setting of this check box.
  12.    ‚Ä¢ Bar Active - This box is checked if the bar graph is active.  The bar graph must be active before you can change any of its settings.  Here are what they do:
  13.       ‚Ä¢ Update time - This value is how often the bar redraws itself.  If the value is too small, the computer may slow down a small amount, and the bar may flicker when the cursor is moved.  If the value is too large, the bar isn‚Äôt updated often.  My favorite setting for this is 1/4 second.
  14.       ‚Ä¢ Tick mark spacing - This value is how much memory the black tick marks should represent.  What you want to set it to probably depends on how much memory you have and whether you usually use MultiFinder or System 7.  If you keep clicking the down arrow, the value will go to ‚ÄúNone,‚Äù in which case there are no tick marks.
  15.       ‚Ä¢ Bar color - This is the color that the bar will be.  Click the color sample to change it (this doesn‚Äôt work on black and white Macs).  Note that the bar color you actually see may be different from the chosen one in 4 or 16 colors, because of the limited number of colors.
  16.    ‚Ä¢ Pie Active - If this box is checked then the pie graph is active.  The pie graph must be active before you can change any of its settings.  Here are what they do:
  17.       ‚Ä¢ Update time - This control operates like the corresponding bar graph control.  The times are longer because the pie graph cannot be updated as often.
  18.       ‚Ä¢ Pie color and pan color - These controls act like the bar color control.  The pie color is the color of the ‚Äúslice‚Äù of pie - the memory used, and the pan color is the color of the ‚Äúpan‚Äù underneath the pie - the memory free.
  19.  
  20. Technical stuff:
  21.    The code installed to draw the graphs communicates with the control panel through what‚Äôs called gestalt.  Gestalt is only present in system 6.0.5 and later - in earlier systems you must restart after you have changed any options in the control panel for them to take effect.
  22.    The bar graph and the pie graph are updated in different ways.  The bar graph is what‚Äôs called a VBL task - meaning a Vertical BLanking task.  The image on your monitor is formed by an electron beam that sweeps across the screen for every row, and then back to the top of the screen, redrawing the entire screen every 60th of a second (75th of a second on some monitors).  While the electron beam is making it‚Äôs way back to the top of the screen, VBL tasks get a chance to execute.  During this time, MemINIT draws the bar graph.  VBL tasks execute no matter what, even when a menu is pulled down or a button is being pressed.  Therefore, the bar graph is updated while these things are happening.  The drawing of the cursor is also a VBL task, and therefore while the mouse is moving the bar graph may not get its time soon enough and may flicker.  Unfortunately, becuase VBL tasks can be executed at any time, they can‚Äôt rely on many other parts of the computer (such as QuickDraw).  Therefore, MemINIT must draw directly to the screen.  This is a tricky process, and I may have done something wrong that will make it crash on some computers.  I‚Äôm not sure how an accelerated video card may interact with it - it may not look very good, but it shouldn‚Äôt cause any problems.  Also, because it writes directly to the screen, if the cursor is on top of it, the cursor will be overwritten.  Also, if the cursor is on top of it and then moved, an incorrect bar may show.  This will correct itself in a few moments.
  23.    The pie graph is a jGNEFilter.  GetNextEvent (or WaitNextEvent under MultiFinder or System 7) is a routine that gets input from the user.  Programs must call it periodically to check for key pressed, mouse clicks, etc.  a jGNEFilter gets a chance to look at that event and modify it.  The pie graph uses this feature, but doesn‚Äôt worry about the event - it just uses the time to draw itself.  Because it is not interrupting other parts of the system, it can use QuickDraw, and therefore should be very reliable.  It will not overwrite the cursor, but the cursor may flicker a little when it is over the pie graph.
  24.    For Techies: I install a VBL task, install a jGNEFilter that calls the old filter, and patch _DrawMenuBar (NOT a tail patch).  I install a Gestalt routine with selector ‚ÄòMemV‚Äô.  The code is installed in the system heap in a block that is about 1K in size.  The VBL task is still active when the graph in deactivated, but it is only called about once every 18 hours and does nothing.
  25.    If you want the code (the cdev code is in Pascal, the INIT code is in assembly), just send me a disk.  It is also on America Online.  There will (hopefully) be an article on it in MacTutor in the next few months (September-October 1991).
  26.  
  27. Credits:
  28.    Thanks to Symantec for their wonderful Pascal compiler and thanks to Patrick C. Beard and James W. Walker for their ShowIconFamily code.  Thanks for Apple DTS for helping solve the on-board video problem.
  29.  
  30. The Legal stuff:
  31.    MemINIT is not ShareWare; I am not asking for any money for it.  However, it is not public domain.  It may not be distributed with any package that is charged for without my consent, unless the charge is just for duplication and handling (i.e. user groups).  If you make any changes and want to distibute a changed version, contact me.  Also contact me if you have any suggestions or bug reports.  If you wish for me to send you all future updates, send me $5.00.
  32.  
  33. Version History:
  34.    ‚Ä¢ MemINIT 0.98 - Very buggy, no control panel interface.
  35.    ‚Ä¢ MemINIT cdev 1.5.1 - Didn‚Äôt work correctly with color.
  36.    ‚Ä¢ MemINIT 2.0 - Complete re-write.  Works well with color.
  37.    ‚Ä¢ MemINIT 2.0.1 - Fixed bug where occasionally pie would be all black when switching to B/W.  Also made it so bar should work on machines with on-board video.
  38.    ‚Ä¢ MemINIT 2.0.2 - Made on-board video fix work better & completely transparent to the user.
  39.    ‚Ä¢ MemINIT 2.0.3 - Doesn't appear when AfterDark is active.
  40.  
  41. How to contact me:
  42.    I am ‚ÄòSethML‚Äô on America Online and ‚ÄòAccuLab‚Äô on AppleLink.
  43.    By Mail:
  44.       Seth LaForge
  45.       658 Wildcat Cny.
  46.       Berkeley, CA 94708
  47.  
  48.   *** Notice to Science Teachers ***
  49.  
  50. I‚Äôm using this as free advertising space.  I work for a company producing a data acquisition system for high school and college science labs.  It consists of a hardware device that plugs into one of the Mac‚Äôs serial ports, and various sensors that can be plugged into it.  These sensors include temperature, pH, light intensity, magnetic intensity, photogate timing, and sonic ranger.  The easy-to-use software allows real time graph and data table of the data, has various analysis functions, and is System 7 savvy.  For more information, contact:
  51.  
  52. LEW & Associates
  53. (415) 325-5898  FAX: (415) 325-5899
  54. 200 California Ave. Suite 217
  55. Palo Alto, CA 94306-1618